package algo.math.evaluator.stack;

import algo.math.evaluator.stack.interfaces.ILinkSimple;

/**
 * Implementation of simple linked stack item.
 *
 * @param <V> the value type
 */
public class LinkSimple<V> implements ILinkSimple<V> {

	private V _value ;
	
	public LinkSimple(V arg0)
	{
		_value = arg0;
	}
	
	@SuppressWarnings("rawtypes")
	private ILinkSimple _next ;
	
	/* (non-Javadoc)
	 * @see algo.math.evaluator.stack.interfaces.ILinkSimple#getNext()
	 */
	@SuppressWarnings("unchecked")
	@Override
	public ILinkSimple<V> getNext() {
		return _next;
	}

	/* (non-Javadoc)
	 * @see algo.math.evaluator.stack.interfaces.ILinkSimple#getValue()
	 */
	@Override
	public V getValue() {
		return _value;
	}

	/* (non-Javadoc)
	 * @see algo.math.evaluator.stack.interfaces.ILinkSimple#setNext(algo.math.evaluator.stack.interfaces.ILinkSimple)
	 */
	@Override
	public void setNext(ILinkSimple<V> arg0) {
		_next = arg0;
	}

	/* (non-Javadoc)
	 * @see algo.math.evaluator.stack.interfaces.ILinkSimple#setValue(java.lang.Object)
	 */
	@Override
	public void setValue(V arg0) {
		_value =arg0;
	}

	
	
}
